const {createProxyMiddleware} = require('http-proxy-middleware');

// 代理配置
module.exports = function (app) {
    app.use(
        '/api',
        createProxyMiddleware({
            // 地址
            target: process.env.REACT_APP_BASE_URL,
            // 允许跨域
            changeOrigin: true,
        })
    );
};